import request from "@/utils/request.js";

// 获取重点对象管理列表
export function getKeyPersonManageList(data, query = {}) {
    return request({
        url: '/bussiness/PEOPLE/list',
        method: 'post',
        params: query,
        data: data,
        isEncrypt: false
    })
}

// 创建重点对象管理
export const createKeyPersonManage = (data) => {
    return request({
        method: 'post',
        url: '/bussiness/PEOPLE/add',
        data,
        isEncrypt: false
    })
}

// 获取重点对象详情
export const getKeyPersonManageInfo = (id) => {
    return request({
        method: 'get',
        url: '/bussiness/PEOPLE/info',
        params: {
            id: id
        },
        isEncrypt: false
    })
}

// 更新重点对象管理
export const updateKeyPersonManage = (data) => {
    return request({
        method: 'post',
        url: '/bussiness/PEOPLE/edit',
        data,
        isEncrypt: false
    })
}

// 删除重点对象管理
export const deleteKeyPersonManage = (data) => {
    return request({
        method: 'post',
        url: '/bussiness/PEOPLE/remove',
        params: {
            ids: data
        },
        isEncrypt: false
    })
}

// 获取重点对象下拉列表
export const getKeyPersonManageSelectList = () => {
    return request({
        method: 'post',
        url: '/bussiness/PEOPLE/queryList',
        params: {
            pageNum: 1,
            pageSize: 500
        },
        data: {},
        isEncrypt: false
    })
}

// 获取重点人员列表不限制单位
export const getKeyPersonManageListNoLimit = (data, query = {}) => {
    return request({
        method: 'post',
        url: '/bussiness/PEOPLE/queryListNoLimit',
        params: query,
        data: data,
        isEncrypt: false
    })
}